/*
 * @Author: yc
 * @Date: 2020-05-26 20:02:36
 * @LastEditTime: 2020-05-29 11:32:59
 * @FilePath: \react-admin\config-overrides.js
 */
const { override, fixBabelImports, addLessLoader, addDecoratorsLegacy, addWebpackAlias } = require('customize-cra')
const modifyVars = require('./theme')
const path = require('path')

module.exports = override(
  fixBabelImports('import',{
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true
  }),
  addLessLoader({
    javascriptEnabled: true,
    modifyVars
  }),
  addDecoratorsLegacy(),
  addWebpackAlias({
    '@': path.resolve(__dirname, 'src')
  })
)
